<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// 配置AJAX模块
$configinfo['ajaxname'] = moduleaqvarval('ajaxname','string');

// pc mobile xcx配置程序
if($configinfo['modulepara'] == "pc" || $configinfo['modulepara'] == "mobile" || $configinfo['modulepara'] == "xcx")
{
	// 配置模块AJAX
	require(MODULEPARA_PATH.'/configmodule/configmodule/configajax.php');
	// 配置扩展AJAX
	require(MODULEPARA_PATH.'/expmodule/expajax.php');
	
	// 加载模板程序配置
	if($configinfo['tplok'] == 1 && $configinfo['tplajaxok'] == 1)
	{
		require($configinfo['tplurl'].'/configmodule/configmodule/configajax.php');
		require($configinfo['tplurl'].'/expmodule/expajax.php');
	}
	
	// 配置会员AJAX
	if(moduleaqvarval('ajaxmember','string'))
	{
		if($configmember)
		{
			require(MODULEPARA_PATH.'/configmodule/configmember/configmemberajax.php');
			require(MODULEPARA_PATH.'/expmodule/member/expmemberajax.php');
			
			// 加载模板程序配置
			if($configinfo['tplok'] == 1 && $configinfo['tplajaxok'] == 1)
			{
				require($configinfo['tplurl'].'/configmodule/configmember/configmemberajax.php');
				require($configinfo['tplurl'].'/expmodule/member/expmemberajax.php');
			}
		}else{
			ajax_error(2,"请先登录会员");	
		}
	}
}

// 后台配置程序
if($configinfo['modulepara'] == "admin")
{
	// 配置后台模块AJAX
	require(MODULEPARA_PATH.'/configmodule/configmodulepara/configajax.php');
	require(MODULEPARA_PATH.'/expmodule/admin/expajax.php');
	
	// 加载模板程序配置
	if($configinfo['tplok'] == 1 && $configinfo['tplajaxok'] == 1)
	{
		require($configinfo['tplurl'].'/configmodule/configmodulepara/configajax.php');
		require($configinfo['tplurl'].'/expmodule/admin/expajax.php');
	}
}

// 商家后台配置程序
if($configinfo['modulepara'] == "supplier" || $configinfo['suppliermodule'] == 1 || $configinfo['adminsuppliermodule'] == 1)
{
	// 配置商家模块AJAX
	require(MODULEPARA_PATH.'/configmodule/configsupplier/configajax.php');
	require(MODULEPARA_PATH.'/expmodule/supplier/expajax.php');
}
?>